package com.learning.springboot.springdataJpa.customJpa;

import com.learning.springboot.Thymeleaf.entity.Person;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
import javax.persistence.EntityManager;
import java.io.Serializable;

/**
 * Created by td on 2017/9/29.
 */
public class CustomReposirotyImpl<T,ID extends Serializable> extends SimpleJpaRepository<T,ID>
        implements CustomReposiroty<T,ID> {

    private EntityManager entityManager;


    public CustomReposirotyImpl(Class<T> domainClass, EntityManager em) {
        super(domainClass, em);
        this.entityManager = em;
    }

/*    @Override
    public void doSomething(ID id) {
        System.out.println("entityManger:" + entityManager);
        System.out.println("id值: "+id);
    }*/

    @Override
    public Page<Person> findByCustom(Person person, Pageable pageable) {

       // return findAll(person,pageable);
        return null;
    }
}
